package Servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import Info.AdminI;
import Manage.AdminM;


public class AdminUS extends HttpServlet{
	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		response.setContentType("text/html;charset=utf-8");
		request.setCharacterEncoding("utf-8");
		
		int id=Integer.parseInt(request.getParameter("id"));
		String name=request.getParameter("name");
		String password=request.getParameter("password");
		AdminI admin=new AdminI(id,name,password);
		AdminM adminm=new AdminM();
		adminm.Update(admin);
		request.getRequestDispatcher("Jump.jsp").forward(request, response);
	}

}
